package com.dream.mqpushserver.common;

/**
 * netty server client 交互基本类
 *  ｜ 消息类型 ｜ 数据长度 ｜ 数据数组 ｜
 *  ｜    1    ｜    4    ｜ byte[]  |
 *  1 + 4 + length
 */
public class RequestCommand2 {

    /**
     * 1 request
     * 2 response
     */
    private byte type ;

    /**
     * 内容总长度
     *
     */
    private int length ;

    /**
     * RpcRequest or RpcResult 数据字节数组
     */
    private byte[] bytes ;

    public byte getType() {
        return type;
    }

    public void setType(byte type) {
        this.type = type;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public byte[] getBytes() {
        return bytes;
    }

    public void setBytes(byte[] bytes) {
        this.bytes = bytes;
    }
}
